package de.slothsoft.wasbinich.android;

import android.support.v4.app.NavUtils;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import de.slothsoft.wasbinich.android.util.StyleUtil;
import de.slothsoft.wasbinich.android.util.SvgUtil;

public class RegisterActivity extends de.slothsoft.android.authenticator.RegisterActivity {

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
	super.onWindowFocusChanged(hasFocus);
	View view = findViewById(R.id.layout);
	SvgUtil.setSvgToBackground(this, view, R.raw.background);
	StyleUtil.styleButton(this, (Button) findViewById(R.id.register_submit));
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
	switch (item.getItemId()) {
	case android.R.id.home:
	    NavUtils.navigateUpFromSameTask(this);
	    return true;
	}
	return super.onOptionsItemSelected(item);
    }

}
